<?php

$request_method = strtolower($_SERVER['REQUEST_METHOD']);

switch ($request_method) {
    case 'post':
        echo "Success!";
        break;
    default:
        break;
}
